#include<iostream>
using namespace std;
class Complex {
private:
	double image;
	double real;
public:
	Complex(double r = 0.0, double i = 0.0) :real(r), image(i) {}
	Complex operator+(double n) {
		return Complex(real + n, image);
	}
	friend Complex operator+(double r,const Complex& other) {
		return Complex(other.real + r,other.image);
	}
	void display() const{
		cout << real << "," << image << endl;
	}
};
int main() {
	Complex a;
	Complex c;
	c = a + 9;
	c.display();
	c = 9 + a;
	c.display();
	return 0;
}